<%@page import="biz.impl.NewsBizImpl"%>
<%@page import="biz.NewsBiz"%>
<%@page import="entity.News"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%

	String title = request.getParameter("title");
	String _id = request.getParameter("id");
	int id = Integer.parseInt(_id);
	
	News news = new News();
	news.setId(id);
	news.setTitle(title);
	
	NewsBiz biz = new NewsBizImpl();
	if(biz.updateNews(news)){
		response.sendRedirect("index.jsp");
		
	}else{
		request.getRequestDispatcher("doEdit.jsp").forward(request, response);
	}
	
	
	
	
	
	
	
	
%>